import java.util.Scanner;

public class homework36 {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);

        System.out.print("请输入一个字符串:");//输入一个字符串
        String str = sc.nextLine();//定义字符串类型

        int count = 0;

        char[] chs = str.toCharArray();

        for (int a = 0; a < chs.length; a++)

            if (chs[a] < '0' || chs[a] > '9')

                count++;

        System.out.println("该字符串中非数字字符出现次数为:" + count + "次");

    }

}
